package com.supinfo.bonjoursupinfo.controller.loader;

import java.util.ArrayList;

import android.content.Context;
import android.support.v4.content.AsyncTaskLoader;

import com.supinfo.bonjoursupinfo.controller.PlaceController;
import com.supinfo.bonjoursupinfo.models.Place;

public class MyMapLoaderRefresh extends AsyncTaskLoader<ArrayList<Place>> {

	public MyMapLoaderRefresh(Context context) {
		super(context);
	}
	
	@Override
    protected void onStartLoading() {
        super.onStartLoading();
        forceLoad();
    }

	@Override
	public ArrayList<Place> loadInBackground() {
		PlaceController ctrl = new PlaceController();
		return ctrl.loadListRefresh();
	}
	
}
